package com.android.wellcherish.workclock.bean.data;
import android.support.annotation.IdRes;
import java.util.Objects;

/**
 * @author 张文琛
 * @date 2020/3/18 22:57
 */
public class RecordAdapterHeadBean extends IBaseBean {
    /**
     * 头布局显示的图标
     * */
    @IdRes
    private int iconRes;

    /**
     * 头布局代表的日期描述
     * */
    private String date;

    public RecordAdapterHeadBean(int id, int iconRes, String date) {
        super(id);
        this.iconRes = iconRes;
        this.date = date;
    }

    public int getIconRes() {
        return iconRes;
    }

    public void setIconRes(int iconRes) {
        this.iconRes = iconRes;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    @Override public String toString() {
        return "{\"RecordAdapterHeadBean\":{"
            + "\"iconRes\":" + iconRes
            + ",\"date\":\"" + date + "\""
            + "}}";
    }

    @Override public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof RecordAdapterHeadBean)) {
            return false;
        }
        RecordAdapterHeadBean that = (RecordAdapterHeadBean) o;
        return getIconRes() == that.getIconRes()
            && Objects.equals(getDate(), that.getDate());
    }

    @Override public int hashCode() {
        return Objects.hash(getIconRes(), getDate());
    }
}
